package it.polimi.jita.cp.block.dd;

import it.polimi.jita.cp.block.dd.ServiceLevel.ServiceLevelType;
import it.polimi.jita.cp.block.de.IInstantDemandEstimatorData;

public class Instant implements IInstantDemandEstimatorData {
	private Double block;
	private Double wait;
	private Double run;
	private Double demand;

	private ServiceLevel sl = new ServiceLevel();

	protected Instant(Double block, Double wait, Double run) {
		this.block = block;
		this.wait = wait;
		this.run = run;
	}

	// private Double calculateServiceLevel(ServiceLevelType slType) {
	// switch (slType) {
	// case RT:
	// Double denominator = getRun().add(getBlock());
	// return getRun().divide(denominator);
	// case T:
	// return getRun().divide(getDemand());
	// default:
	// throw new RuntimeException("Service level type is not recognised.");
	// }
	// }

	protected void setServiceLevel(ServiceLevelType slType, Double value) {
		sl.put(slType, value);
	}

	public void setDemand(Double demand) {
		this.demand = demand;

	}

	protected void setRun(Double run) {
		this.run = run;
	}

	@Override
	public Double getBlock() {
		return block;
	}

	@Override
	public Double getWait() {
		return wait;
	}

	@Override
	public Double getRun() {
		return run;
	}

	@Override
	public Double getDemand() {
		return demand;
	}

	protected ServiceLevel getSl() {
		return sl;
	}
}
